import config from "@/config"
import http from "@/utils/request"

export default {
  getSubScriptionList: {
    url: `${config.API_URL}/ms/cms/notifications/list`,
    name: "获取推送列表",
    get: async function(params){
      return await http.get(this.url, params)
    }
  },
  getSubScriptionInfo: {
    url: `${config.API_URL}/ms/cms/notifications/info/`,
    name: "推送详情",
    get: async function(id){
      return await http.get(this.url + id)
    }
  },
  postMessageInfo: {
    url: `${config.API_URL}/ms/cms/notifications/save`,
    name: "添加推送",
    post: async function(data){
      return await http.post(this.url, data)
    }
  },
  putAuditPass: {
    url: `${config.API_URL}/ms/cms/notifications/passAudit/`,
    name: "审核推送通过",
    put: async function(id){
      return await http.put(this.url + id)
    }
  },
  putAuditReject: {
    url: `${config.API_URL}/ms/cms/notifications/rejected/`,
    name: "审核推送拒绝",
    put: async function(id){
      return await http.put(this.url + id)
    }
  },
  getTestUserList: {
    url: `${config.API_URL}/ms/cms/notifications/list/userTest`,
    name: "获取测试用户列表",
    get: async function(params){
      return await http.get(this.url, params)
    }
  },
  putCancelSubscription: {
    url: `${config.API_URL}/ms/cms/notifications/canceled/`,
    name: "取消推送",
    put: async function(id){
      return await http.put(this.url + id)
    }
  },
  getEstimatedPushCount: {
    url: `${config.API_URL}/ms/cms/notifications/getEstimatedPushCount`,
    name: "获取推送预估人数",
    get: async function(params){
      return await http.get(this.url, params)
    }
  },
  
  
  
}